package main

import (
	"fmt"
)

func main() {
	userMap := map[int]string{
		1: "枫枫",
		2: "阳阳",
		3: "红红",
	}
	fmt.Println(userMap)
	fmt.Println(userMap[1])
	n, err := userMap[5]
	if !err {
		fmt.Println("err:", n, err)
	}

	delete(userMap, 3)
	fmt.Println(userMap)

	//map是复杂数据类型必须初始化
	amap := map[string]string{}
	bmap := make(map[string]string)
	fmt.Println(amap, bmap)
}
